package com.daodao.daodaoschedule.ui.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.daodao.daodaoschedule.application.service.WechatMemberService;
import com.daodao.daodaoschedule.ui.dto.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mal
 * @date 2022-09-08 14:55
 */
@RestController
@RequestMapping("/wechat-member")
public class WechatMemberController {

    @Autowired
    private WechatMemberService wechatMemberService;


    @RequestMapping("/page")
    public AjaxResult getPageList(@RequestParam(defaultValue = "1") Integer pageNum,
                                          @RequestParam(defaultValue = "10") Integer pageSize) {

        return AjaxResult.success(wechatMemberService.page(new Page<>(pageNum, pageSize)));

    }
}
